﻿Public Class VBCMISService

   Private _host As New CMISConnectorLibrary.ServiceManager

   Protected Overrides Sub OnStart(ByVal args() As String)

      Dim uriHttp As New Uri(System.Configuration.ConfigurationManager.AppSettings("ServiceUri"))
      Dim uriHttps As Uri = Nothing
      If Not String.IsNullOrEmpty(System.Configuration.ConfigurationManager.AppSettings("ServiceUriHttps")) Then
         uriHttps = New Uri(System.Configuration.ConfigurationManager.AppSettings("ServiceUriHttps"))
      End If
      _host.OpenHost(uriHttp, uriHttps)
   End Sub

   Protected Overrides Sub OnStop()
      _host.Dispose()
   End Sub

End Class
